# encoding: utf-8
# @project: st2111 
# @file: lxml_element.py
# @time: 2023/4/20 15:39
# @author: abcque
# @license: (C) Copyright 2013-2021
# @contact: abcque@outlook.com
# @IDE: PyCharm
# @desc:
from lxml import etree

if __name__ == "__main__":
    root = etree.Element("root")
    print(root.tag)

    parent = etree.Element("parent", color="red")
    parent.text = "abcd"
    print(parent.tag)
    print(etree.tostring(parent))



